package com.qk.management.mapper;

import com.qk.dpmain.user.UserDO;
import com.qk.dto.user.UserDTO;
import com.qk.entity.Activity;
import com.qk.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @文件名: UserMapper
 * @作者: DX
 * @创建日期: 2025/10/7
 * @描述:
 */
@Mapper
public interface UserMapper {

    @Select("select * from user where username = #{operateUserName}")
    User getByname(String operateUserName);

    @Select("select * from user where username = #{username}")
    User getByUsername(String username);

    List<UserDO>  selectByPage(UserDTO dto);

    void insert(User user);

    @Select("select * from user where id = #{id}")
    User getById(Integer id);

    void update(User user);

    List<Activity> listByRole(String roleLabel);

    void deleteByIds(List<Integer> ids);

    @Select("select image from user")
    List<String> getAllImages();
}
